//
//  WifiDevice.m
//  AQ800
//
//  Created by 赵武 on 14-5-23.
//  Copyright (c) 2014年 杭州茂葳科技有限公司. All rights reserved.
//

#import "WifiDevice.h"

@interface WifiDevice()
{
    // DID，MAC，密码，局域网IP
}
@end

@implementation WifiDevice

// 恢复为默认参数
- (void)defaultParame
{
    self.m_password = nil;
    self.m_did = nil;
    self.m_lock = NO;
    self.m_mac = nil;
    self.m_lanIp = nil;
}

// 对比设备基础信息是否相同
- (BOOL)compareBase:(WifiDevice *)dev
{
    if ( [dev.m_mac compare:_m_mac] == NSOrderedSame )
    {
        if ([dev.m_password compare:_m_password] == NSOrderedSame )
        {
            if ([dev.m_lanIp compare:_m_lanIp] == NSOrderedSame )
            {
                if ( [dev.m_did compare:_m_did] == NSOrderedSame )
                {
                    return YES;
                }
            }
        }
    }
    return NO;
}

- (NSString *)description
{
    return [NSString stringWithFormat:@"Mac = %@ \nDid = %@\nPwd = %@\nLanIP = %@",
            self.m_mac, self.m_did, self.m_password, self.m_lanIp];
}
@end
